#define _CRT_SECURE_NO_WARNINGS 1

#include "SeqList.h"

void TestSeqList1()
{
    SeqList s;
    SeqListInit(&s);
    SeqListPushBack(&s, 1);
    SeqListPushBack(&s, 2);
    SeqListPushBack(&s, 3);
    SeqListPushBack(&s, 4);
    SeqListPushBack(&s, 5);

    SeqListPrint(&s);

    SeqListPopBack(&s);
    SeqListPrint(&s);

    SeqListPopBack(&s);
    SeqListPrint(&s);

    SeqListPopBack(&s);
    SeqListPrint(&s);

    SeqListPopBack(&s);
    SeqListPrint(&s);
}
void TestSeqList2()
{
    SeqList s;
    SeqListInit(&s);
    SeqListPushFront(&s, 0);
    SeqListPushFront(&s, 1);
    SeqListPushFront(&s, 2);
    SeqListPushFront(&s, 3);
    SeqListPushFront(&s, 4);
    SeqListPrint(&s);

    SeqListPopFront(&s);
    SeqListPopFront(&s);
    SeqListPrint(&s);

    SeqListPopFront(&s);
    SeqListPrint(&s);
    SeqListPopFront(&s);
    SeqListPrint(&s);
    SeqListPopFront(&s);
    SeqListPrint(&s);
}

void TestSeqList3()
{
    SeqList s;
    SeqListInit(&s);
    SeqListPushFront(&s, 0);
    SeqListPushFront(&s, 1);
    SeqListPushFront(&s, 2);
    SeqListPushFront(&s, 3);
    SeqListPrint(&s);

    SeqListInsert(&s, 3, 30); 
    SeqListInsert(&s, 0, -1);
    SeqListInsert(&s, 0, -2);
    SeqListPrint(&s);

    SeqListErase(&s, 0);
    SeqListErase(&s, 0);
    SeqListErase(&s, 3);
    SeqListPrint(&s);
}
int main()
{
    TestSeqList3();
}
